/**
 * Created by c.y on 2018-3-7
 * 文件说明: GET请求的excel下载的参数的封装
 */

import validate from './validator';

/**
 * GET请求的excel下载的参数的封装
 * @param data 查询的条件的表单对象
 * @return {string}
 */
function buildUpDownloadParams(data) {
    let _str = '';
    for (let x in data) {
        if (!validate.checkValEmpty(data[x])) {
            _str += '&' + x + '=' + data[x];
        }
    }
    return _str.substring(1, _str.length);
}

export default {
    buildUpDownloadParams: buildUpDownloadParams
};
